-
Notifications
You must be signed in to change notification settings - Fork 993
Add Svukte extension support #2121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ingallsj can I delegate to you to review this, particularly the various cases in check_svukte_qualified?
This adds support for the Svukte extension, which adds support for address-independent latency of user-mode faults to supervisor addresses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @aswaterman
Modification by your suggestion has been done.
Many thanks for review
| } else if (ext_str == "svinval") { | ||
| extension_table[EXT_SVINVAL] = true; | ||
| } else if (ext_str == "svukte") { | ||
| extension_table[EXT_SVUKTE] = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a check that XLEN is 64 and issue an error if not.
| return !hstatus_hukte; | ||
| } | ||
|
|
||
| if (((addr >> SYS_MEM_HEADING_BIT) & 0x1)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have assert(proc->get_xlen() == 64) here. Then we can simply write if ((addr >> 63) & 1).
| if (((addr >> SYS_MEM_HEADING_BIT) & 0x1)) { | ||
| return ((state->v || forced_virt) && | ||
| ((proc->get_xlen() == 64) ? ((state->vsatp->read() & SATP64_MODE) == 0) : | ||
| ((state->vsatp->read() & SATP32_MODE) == 0))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And then we can get rid of the XLEN=32 stuff here.
| #endif | ||
|
|
||
| // Svukte extension | ||
| #define SYS_MEM_HEADING_BIT 63 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And we can get rid of this, too.
| } | ||
| } | ||
|
|
||
| [[noreturn]] void throw_page_access_exception(bool virt, reg_t addr, access_type type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename this function to throw_page_fault_exception.
This adds support for the Svukte extension, which adds support for address-independent latency of user-mode faults to supervisor addresses.